home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 1.4 KB | 71 lines | [TEXT/CWIE] |
- // Application.h
-
- #ifndef Application_h
- #define Application_h
-
- #ifndef EventMaker_h
- #include "EventMaker.h"
- #endif
- #ifndef CommandHandler_h
- #include "CommandHandler.h"
- #endif
- #ifndef ContextFree_h
- #include "ContextFree.h"
- #endif
- #ifndef Quitting_h
- #include "Quitting.h"
- #endif
- #ifndef ScreenPartMaker_h
- #include "ScreenPartMaker.h"
- #endif
- #ifndef WindowLocator_h
- #include "WindowLocator.h"
- #endif
- #ifndef KeyMessageMaker_h
- #include "KeyMessageMaker.h"
- #endif
- #ifndef RootFocus_h
- #include "RootFocus.h"
- #endif
- #ifndef PreparingToQuit_h
- #include "PreparingToQuit.h"
- #endif
- #ifndef Broadcaster_h
- #include "Broadcaster.h"
- #endif
-
- class Application: public ContextFree,
- public EventMaker,
- public ScreenPartMaker,
- public WindowLocator,
- public KeyMessageMaker,
- public CommandHandler< Quitting >,
- public Broadcaster< PreparingToQuit >
- {
- private:
- bool quitting;
-
- static Application *the;
-
- // not implemented:
- Application( const Application& );
- void operator=( const Application& );
-
- protected:
- Application();
- ~Application();
-
- public:
- static Application& The() { Assert( the != 0 ); return *the; }
-
- RootFocus& Focus() { return RootFocus::The(); }
- const RootFocus& Focus() const { return RootFocus::The(); }
-
- virtual void Run();
-
- virtual bool CanQuit() const;
- virtual void Quit( SavingOption save = SavingOption::ask );
- };
-
- #endif
-